package com.yugao.fintech.antelope.infra.weixin.mp.model.rqrs;

import com.yugao.fintech.antelope.infra.weixin.mp.model.entity.MpMenu;
import com.yugao.fintech.antelope.base.model.constants.ValidationCons;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.List;


@Data
public class MpMenuReq {
    @NotNull(message = ValidationCons.NOT_EMPTY)
    @Valid
    private List<Menu> menus;

    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class Menu extends MpMenu {
        /**
         * 孩子
         */
        @Valid
        private List<Menu> children;
    }
}
